﻿var generator = require('./HappyGenerator');

var project = {
    module: 'HappyExample',
    rootNamespace: 'Happy.Example',
    serverProjectDirectory: 'E:\\Coding\\Server\\Src\\Example\\Happy.Example',
    clientProjectDirectory: 'E:\\Coding\\Server\\Src\\Happy.Web.Mvc.Host\\Module\\Happy.Example',
    //connectionString: 'Data Source=PC-20121222RSNM\\SQLEXPRESS;Initial Catalog=TestDatabase;Integrated Security=True',
    connectionString: 'Data Source=DUANGWPC\\SQLEXPRESS;Initial Catalog=TestDatabase;Persist Security Info=True;User ID=sa;Password=woshishui2010',
    tables: {
        'TestGrids': {
            isAggregate: true
        },
        'TestTrees': {
            isAggregate: true,
            isTree: true
        },
        'TestOrders': {
            isAggregate: true
        },
        'TestOrderDetails': {
            isEntity: true,
            aggregate: 'TestOrders'
        }
    }
};

generator.generate(project);